<?php $this->load->view('common/admin_header');?>
<div class="block">
  <div class="block_head">
    <div class="bheadl"></div>
    <div class="bheadr"></div>
    <h2><?=$lang['global_lable_36']?></h2>
    <ul>
      <li><a href="<?=site_url('admins/users').'?'.base64_decode($this->input->cookie('url_query'))?>"><?=$lang['global_lable_41']?></a></li>
    </ul>
  </div>
  <!-- .block_head ends -->
  <div class="block_content">
    <?php $this->load->view('common/notify');?>
  <form id="form" action="<?=site_url('admins/users/modify');?>" method="post" enctype="multipart/form-data">
    <input type="hidden" name="edit_id" value='<?=set_value('edit_id',isset($edit_id)?$edit_id:'')?>' />
      <p>
        <label><?=$lang['admin_lable_3']?>:</label>
        <input type="text" class="text small" name="login_name" value='<?=set_value('login_name',isset($login_name)?$login_name:'')?>'/>
        <span class="note required">*<?=$lang['global_lable_35']?></span>
      </p>
      <?php if(!isset($edit_id) || $edit_id<=0):?>
      <p>
        <label><?=$lang['admin_lable_19']?>:</label>
        <input type="password" class="text small" name="password" />
        <span class="note required">*<?=$lang['global_lable_35']?></span>
      </p>
      <p>
        <label><?=$lang['admin_lable_20']?>:</label>
        <input type="password" class="text small" name="confirm_pwd" />
        <span class="note required">*<?=$lang['global_lable_35']?></span>
      </p>
      <?php endif;?>
      <p>
        <label><?=$lang['admin_lable_21']?>:</label>
        <select name="group_id" id="group_id">
          <option value=""><?=$lang['admin_lable_22']?></option>
          <?php foreach($groups->result_array() as $list):?>
          <option value="<?=$list['id']?>" <?=set_select('group_id',$list['id'])?> <?=isset($group_id) && $group_id==$list['id']?'selected':''?>><?=$list['name']?></option>
          <?php endforeach;?>
        </select>
        <span class="note"><a href="<?=site_url('admins/users_group/add')?>" target="_blank"><?=$lang['admin_lable_23']?></a></span>
        <span class="note required">*<?=$lang['global_lable_35']?></span>
      </p>
      <p  style="display:none">
        <label>電郵:</label>
        <input type="text" class="text small" name="email" value='<?=set_value('email',isset($email)?$email:'')?>'/>
        <span class="note required">*<?=$lang['global_lable_35']?></span>
      </p>
      <p>
        <label><?=$lang['global_lable_17']?>:</label>
        <input type="text" class="text small" name="sort_order" value='<?=set_value('sort_order',isset($sort_order)?$sort_order:0)?>'/>
      </p>
      <p>
        <label><?=$lang['global_lable_16']?>:</label>
        <input type="radio" class="radio" name="status" value="1" <?=set_radio('status', '1', TRUE); ?> <?=isset($status) && $status==1?'checked':''?> />
        <span><?=$lang['global_lable_37']?></span>
        <input type="radio" class="radio" name="status" value="2" <?=set_radio('status', '2'); ?> <?=isset($status) && $status==2?'checked':''?> />
        <span><?=$lang['global_lable_38']?></span>
      </p>
      <p>
        <input class="btn btn-primary" type="submit" name="btn_save" value="<?=$lang['global_lable_12']?>" />
        <input class="btn" type="reset" value="<?=$lang['global_lable_13']?>"/>
      </p>
    </form>
  </div>
  <!-- .block_content ends -->
  <div class="bendl"></div>
  <div class="bendr"></div>
</div>
<!-- .block ends -->
<?php $this->load->view('common/admin_footer');?>

